Error: object 'anthr' not found
Spring 2026
This is a data science class…
R is a programming language.
Rstudio is an integrated developmental environment (IDE)
R is a functional programming language.
A function is a self-contained block of code that accomplishes a specific task
Functions are bundled within packages
Demo!
R is case sensitive…
x is not the same as X.
my_variable is not the same as My_Variable.
sum() is not the same as SUM().
but R is communicative
Always check spelling first (and syntax)…
The assignment operator [<-] is used to assign values to objects. The following lines of code are read as “___ gets the value of ___”.
After assigning a value to an object, R does not automatically show it in your console. It does populate in the [Environment Pane]. Double check your object exists by typing the name of the object or checking the local environment. Note, it must exist locally to be used in other observations.
Quotation marks and parentheses must come in pairs!
R will “tell you” with a [+] sign…
Solution: Press [Esc] to cancel that line of code and start again.
? followed by some function or object name searches specific documentation. This is the same as the function help()?? followed by some word or phrase is a broader search function and searches all documentation in memory. This is shorthand for help.search()Canyoureadthissentence?
After function names, do not leave a space
Before and after operator (+, -, <-, *, /), leave a space
Put a space after a comma, not before
Use consistent style –> whatever that may be…
Open RStudio and type “Good morning, R” into the console. That’s it. Seriously.
Write code for 5 minutes
Use one new function. Reading the help page counts.
Make a single commit on git.
Be mundane.